package com.huihui.widget.dialog;

import android.content.Context;
import android.support.v7.app.AppCompatDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;

import com.huihui.R;

/**
 * Created by yinsxi on 2018/8/26.
 */

public class BaseDialog extends AppCompatDialog {

    private FrameLayout layout;

    public BaseDialog(Context context) {
        super(context, R.style.BaseDialog_style);
        init();
    }
    private void init(){
        View view = LayoutInflater.from(getContext()).inflate(R.layout.base_dialog_layout,null);
        layout = view.findViewById(R.id.base_content_layoutid);
        setContentView(view);
    }
    public void addView(View view){
        if(view != null){
            layout.addView(view);
        }
    }
}
